﻿<Window x:Class="DTC.Popups.ParentPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Родитель" Style="{StaticResource PopupWindow}" Height="500" Width="370" Closing="Window_Closing">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/Brushes.xaml"/>
                <ResourceDictionary Source="../Resources/TextEditStyles.xaml"/>
                <ResourceDictionary Source="../Resources/ListBoxStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <StackPanel Margin="20" Name="MainSP" VerticalAlignment="Center">
        <WrapPanel>
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Фамилия:"/>
            <TextBox Text="{Binding Surname, Mode = OneWay}"
                     Name="SurnameTB"
                     Width="170"
                     Margin="5,0,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0">
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Имя:"/>
            <TextBox Text="{Binding Name, Mode = OneWay}"
                     Name="NameTB"
                     Width="170"
                     Margin="28,0,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0">
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Отчество:"/>
            <TextBox Text="{Binding Fathername, Mode = OneWay}"
                     Name="FathernameTB"
                     Width="170"
                     Margin="5,0,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0">
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Статус:"/>
            <TextBox Text="{Binding Status, Mode = OneWay}"
                     Name="StatusTB"
                     Width="185"
                     Margin="5,0,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0">
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Род деятельности:"/>
            <TextBox Text="{Binding Occupation, Mode = OneWay}"
                     Name="OccupationTB"
                     Width="250"
                     Margin="5,5,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0">
            <TextBlock Foreground="{StaticResource MarkingFontColor}"
                       Text="Название организации:"/>
            <TextBox Text="{Binding WorkOrganisation, Mode = OneWay}"
                     Name="WorkOrganisationTB"
                     Width="250"
                     Margin="5,5,0,0"/>
        </WrapPanel>
        <WrapPanel Margin="0,10,0,0"></WrapPanel>
        <TextBlock Foreground="{StaticResource MarkingFontColor}"
                   Text="Телефоны:"/>
        <Grid>
            <ListBox Name="PhonesListBox"
                     Height="80"
                     Margin="15,5,0,0"
                     MouseDoubleClick="PhonesListBox_MouseDoubleClick">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="150"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Text="{Binding Number}"/>
                            <TextBlock Grid.Column="1" Text="{Binding Description}"/>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <Button Name="NewPhoneButton"
                Grid.Column="1" Grid.Row="0"
                VerticalAlignment="Top"
                HorizontalAlignment="Left"
                Height="15" Width="15"
                Margin="1,21,-1,0"
                Style="{StaticResource AddRecButton}"
                Click="NewPhoneButton_Click"/>
            <Button Name="DelPhoneButton"
                Grid.Column="1" Grid.Row="0"
                VerticalAlignment="Top"
                HorizontalAlignment="Left"
                Height="15" Width="15"
                Margin="1,38,-1,0"
                Style="{StaticResource DelRecButton}"
                Click="DelPhoneButton_Click"/>
            <Button Name="ViewPhoneButton"
                Grid.Column="1" Grid.Row="0"
                VerticalAlignment="Top"
                HorizontalAlignment="Left"
                Height="15" Width="15"
                Margin="1,4,-1,0"
                Style="{StaticResource ViewRecButton}"
                Click="ViewPhoneButton_Click"/>
        </Grid>
    </StackPanel>
</Window>
